// #include <ros/ros.h>
// #include <nav_msgs/Odometry.h>

// void speed_callback(const nav_msgs::Odometry::ConstPtr &msg)
// {
//     ROS_INFO("Car linear v: vx=%0.6f, vy=%0.6f,vz=%0.6f",msg->twist.twist.linear.x,msg->twist.twist.linear.y,msg->twist.twist.linear.z);
//     ROS_INFO("Car angular v: ax=%0.6f, ay=%0.6f,az=%0.6f",msg->twist.twist.angular.x,msg->twist.twist.angular.y,msg->twist.twist.angular.z);
//     return;
// }

// int main(int argc, char **argv)
// {
//     ros::init(argc,argv,"speed_subscriber");
//     ros::NodeHandle nh;
//     ros::Subscriber speed_sub = nh.subscribe("/odom",10,speed_callback);
//     ros::spin();
//     return 0;
// }

#include "ros/ros.h"
#include "scout_msgs/ScoutStatus.h"
#include "string.h"
#include "iostream"
using namespace std;

void read(const scout_msgs::ScoutStatus::ConstPtr &msg)
{

    cout << "linear_velocity=" << msg->linear_velocity << "   angular_velocity=" << msg->angular_velocity << endl;
}

int main(int argc, char **argv)
{

    ros::init(argc, argv, "speed_subscriber");

    ros::NodeHandle n;
    ros::Subscriber sub;
    sub = n.subscribe("/scout_status", 1, read);

    ros::spin();

    return 0;
}
